import NumberRuleApi from '@/api/numRule/NumRuleManagerApi'
var getNumber = async function (that, resultClass, jobject, numberObject, numberDisAble, numberFeild) {
  if (that[numberObject] != null && that[numberObject][numberFeild] != null && that[numberObject][numberFeild] != "") {
    return;
  }
  let http = new NumberRuleApi();
  let numberobj = await http.getNumber2({ entityResultClass: resultClass, jsonString: JSON.stringify(jobject) });
  if (numberobj == null || numberobj.data == null || numberobj.data == "") {
    that[numberDisAble] = true;
  } else {
    if (numberobj.data.isAddView) {
      that[numberDisAble] = numberobj.data.edit;
      that.$set(that[numberObject], numberFeild, numberobj.data.number)
    } else {
      that[numberDisAble] = numberobj.data.edit;

    }
  }
}
export default { getNumber };


